import request from '@/utils/request'

// 查询科室列表
export function listDepart(query) {
  return request({
    url: '/manager/depart/list',
    method: 'get',
    params: query
  })
}

// 查询科室详细
export function getDepart(id) {
  return request({
    url: '/manager/depart/' + id,
    method: 'get'
  })
}

// 新增科室
export function addDepart(data) {
  return request({
    url: '/manager/depart',
    method: 'post',
    data: data
  })
}

// 修改科室
export function updateDepart(data) {
  return request({
    url: '/manager/depart',
    method: 'put',
    data: data
  })
}

// 删除科室
export function delDepart(id) {
  return request({
    url: '/manager/depart/' + id,
    method: 'delete'
  })
}

// 导出科室
export function exportDepart(query) {
  return request({
    url: '/manager/depart/export',
    method: 'get',
    params: query
  })
}